package com.dw.demo;

import android.os.Bundle;

import androidx.fragment.app.FragmentActivity;

import com.dw.eboxcore.BoxVideoView;
import com.dw.eboxcore.panel.SimpleUIPanel;
import com.dw.eboxcore.player.IPlayer;
import com.dw.eboxijkplayer.player.IjkPlayer;
import com.dw.eboxsystemplayer.player.SystemMediaPlayer;

public class MainActivity extends FragmentActivity {
    //        String url = "http://wantu-1z6c-daren-hz.oss-cn-hangzhou.aliyuncs.com/1649421770507/e9fb9892c669b284.mp4?";
//        String url = "https://1256993030.vod2.myqcloud.com/d520582dvodtransgzp1256993030/cc9f922c5285890781386012275/v.f240.ts?start=14601960&end=19270187&type=mpegts";
//        String url = "http://vfx.mtime.cn/Video/2019/03/21/mp4/190321153853126488.mp4";
//        String url = "http://vfx.mtime.cn/Video/2019/03/18/mp4/190318231014076505.mp4";
        String url = "http://vfx.mtime.cn/Video/2019/03/09/mp4/190309153658147087.mp4";
//        String url = "https://cache.m3u8.shenglinyiyang.cn/duoduo/20220522/26bfb3f53f49304de1cf5546f1ec9b17.m3u8?st=5teKq_534pZ-OdQfxOTTeA&e=1653187637";
//    String url = "http://81.69.26.163:9090/4.rmvb";
//    String url = "https://vod2.hjbfq1.com/20220514/n6MFEBSC/index.m3u8";
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        BoxVideoView boxVideoView = findViewById(R.id.box_view);
//        IPlayer player = new SystemMediaPlayer();
        IPlayer player = new IjkPlayer();
        boxVideoView.setPlayer(player);

        SimpleUIPanel panel = new SimpleUIPanel(this);
        boxVideoView.setPanel(panel);
        panel.setData(url);
    }
}